<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>材料类型</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css" media="all">
<link rel="stylesheet" href="../../res/css/cst/snproduction.css" media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
</head>
<body>

	<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
		类型名称:
		<div class="layui-inline"> 
			<input class="layui-input" style="height: 32px;" id="typeName" maxlength="7" placeholder="请输入类型名称:"
				autocomplete="off">
		</div>
		开始时间：
		<div class="layui-inline">
			<input class="layui-input" style="height: 32px;" name="id" id="date"
				placeholder="yyyy-MM-dd" autocomplete="off">
		</div>
		-截止时间:
		<div class="layui-inline">
			<input class="layui-input" name="id" id="time" style="height: 32px;"
				placeholder="yyyy-MM-dd" autocomplete="off">
		</div>

		<button class="layui-btn layui-btn-sm" data-type="reload"
			id="selectButton">搜索</button>
		<button class="layui-btn layui-btn-warm layui-btn-sm" id="insert">增加</button>

	</div>

	<table class="layui-table"
		lay-data="{ url:'../../matype/findAll.action', page:true, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{type:'checkbox', fixed: 'left'}"></th>
				<th lay-data="{field:'typeId',align:'center'}">材料类型编号</th>
				<th lay-data="{field:'typeName',sort: true, align:'center'}">材料类型名称</th>
				<th lay-data="{field:'oper', align:'center'}">操作人</th>
				<th lay-data="{field:'optime', align:'center'}">操作时间</th>
				<th lay-data="{fixed: 'right',fixed: 'right', align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>

<script type="text/html" id="barDemo">
     <button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button>
	 <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>
</script>

	<!-- 增加或修改的弹框 -->
	<div id="addOrUpdate" style="display: none;">
		<form id="myform" class="layui-form" method="post" style="margin-top: 10px;">
			<input type="hidden" name="typeId" id="typeId" />
			
			<div class="aru">
				<label class="layui-form-label">类型名称:</label>
				<div class="layui-input-block">
					<input name="typeName" id="maTypeName"  class="layui-input" onblur="findMaTypeName()" type="text">
					<input type="hidden" class='clyz' id="maTypeNametyz">
				</div>
			</div>
			
			<div class="aru">
				<div class="layui-input-block">
					<input type="button" class="layui-btn" id="sub" value="确认提交" /> <a
						href="javascript:exit();" class="layui-btn layui-btn-danger">关闭</a>
				</div>
			</div>
		</form>
	</div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../res/js/cst/snmatype.js"></script>
</body>
</html>